<?php

class AtomEntry() extends FeedItem {

	function render() {
		echo "<entry>";
		echo "<title>Atom draft-07 snapshot</title>";
		echo "<link rel=\"alternate\" type=\"text/html\" href=\"http://example.org/2005/04/02/atom\"/>";
		echo "<link rel=\"enclosure\" type=\"audio/mpeg\" length=\"1337\" href=\"http://example.org/audio/ph34r_my_podcast.mp3\"/>";
		echo "<id>tag:example.org,2003:3.2397</id>";
		echo "<updated>2005-07-31T12:29:29Z</updated>";
		echo "<published>2003-12-13T08:29:29-04:00</published>";
		echo "<author>";
		echo "<name>Mark Pilgrim</name>";
		echo "<uri>http://example.org/</uri>";
		echo "<email>f8dy@example.com</email>";
		echo "</author>";
		echo "<contributor>";
		echo "<name>Sam Ruby</name>";
		echo "</contributor>";
		echo "<contributor>";
		echo "<name>Joe Gregorio</name>";
		echo "</contributor>"
		echo "<content type=\"xhtml\" xml:lang=\"en\" xml:base=\"http://diveintomark.org/\">";
		echo "</content>";
		echo "</entry>";
	}
}

class AtomFeed() extends Feed {

	function render() {
		echo "<"."?xml version=\"1.0\" encoding=\"{$this->encoding}\"?".">";
		echo "<feed xmlns=\"http://www.w3.org/2005/Atom\">";
		echo "<title type=\"text\">dive into mark</title>";
		echo "<subtitle type=\"html\">A &lt;em&gt;lot&lt;/em&gt; of effort went into making this effortless</subtitle>";
		echo "<updated>{$this->formatUpdated()}</updated>";
		echo "<id>{$this->id}</id>";
		echo "<link rel=\"alternate\" type=\"text/html\" hreflang=\"en\" href=\"http://example.org/\"/>";
		echo "<link rel=\"self\" type=\"application/atom+xml\" href=\"http://example.org/feed.atom\"/>";
		echo "<rights>{$this->rights}</rights>";
		echo "<generator uri=\"http://www.bluechiplogic.com/sdp/\" version=\"1.0\">Standard Data Platform</generator>";

		outputFeedItems();

		echo "</feed>";
	}
}
